//
//  WADateValueTransformer.m
//  WeatherApp
//
//  Created by Yuliya Grasevych on 30.07.14.
//  Copyright (c) 2014 Yuliya Grasevych. All rights reserved.
//

#import "WATimeValueTransformer.h"

@implementation WATimeValueTransformer

+(Class)transformedValueClass
{
    return [NSString class];
}
-(id)transformedValue:(id)value
{
    NSString *dateString = @"";
    if (value) {
        
        NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
        [dateFormatter setDateFormat:@"HH:mm"];
        dateString = [dateFormatter stringFromDate:value];
    }
    return dateString;
}
@end
